package com.woniuxy.dao;

import com.woniuxy.vo.ProductVo;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/*
@author Jan
@create 2020-06-08 17:33

*/
public interface ProductRepo extends ElasticsearchRepository<ProductVo,Integer> {
    @Query("{\n" +
            "    \"bool\":{\"should\":\n" +
            "    [\n" +
            "      {\"match\":{\"proName\":\"?0\"}},\n" +
            "    {\"match\":{\"describe\":\"?0\"}}\n" +
            "    ]}\n" +
            "  }")
    List<ProductVo> selectProductVoByFenYe(String kw);
}
